//
//  loginViewController.m
//  littleLight's Project-A
//
//  Created by dllo on 16/5/27.
//  Copyright © 2016年 light. All rights reserved.
//

#import "loginViewController.h"
#import "RegisterViewController.h"
@interface loginViewController ()
@property (nonatomic, strong) UITextField *userName;
@property (nonatomic, strong) UITextField *passWord;

@end

@implementation loginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    UILabel *lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(40, self.view.frame.size.height / 5 * 2 - 50, [UIScreen mainScreen].bounds.size.width - 80, 1)];
    lineLabel.backgroundColor = [UIColor grayColor];
    [self.view addSubview:lineLabel];
    
    
    
    self.userName = [[UITextField alloc] initWithFrame:CGRectMake(50, self.view.frame.size.height / 5 * 2, [UIScreen mainScreen].bounds.size.width - 100, 50)];
    self.userName.layer.borderColor = [[UIColor grayColor] CGColor];
    self.userName.layer.borderWidth = 1;
    self.userName.placeholder = @"请输入用户名";
    
    [self.view addSubview:self.userName];
    self.passWord = [[UITextField alloc] initWithFrame:CGRectMake(50, self.view.frame.size.height / 5 * 2 + 70, [UIScreen mainScreen].bounds.size.width - 100, 50)];
    self.passWord.layer.borderColor = [[UIColor grayColor] CGColor];
    self.passWord.layer.borderWidth = 1;
   self.passWord.placeholder = @"请输入密码";
    
    [self.view addSubview:self.passWord];
    
    UIButton *registerButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [registerButton setImage:[UIImage imageNamed:@"{4DB49129-EB08-91BF-048E-EE0E7CA524D2}"] forState:UIControlStateNormal];
    registerButton.frame = CGRectMake(50,self.view.frame.size.height / 5 * 2 + 140 , [UIScreen mainScreen].bounds.size.width / 2 - 60, 50);
    [registerButton addTarget:self action:@selector(registerAction) forControlEvents:UIControlEventTouchUpInside];
    
    [self.view addSubview:registerButton];
    UIButton *loginButton = [UIButton buttonWithType:UIButtonTypeCustom];
    [loginButton setImage:[UIImage imageNamed:@"{56FD8695-FE36-BCC9-AED5-A81F74C65CD2}-1"] forState:UIControlStateNormal];
    loginButton.frame = CGRectMake(  [UIScreen mainScreen].bounds.size.width / 2 + 10, self.view.frame.size.height / 5 * 2 + 140, [UIScreen mainScreen].bounds.size.width / 2 - 60, 50);
    [self.view addSubview:loginButton];
    
    
}


- (void)registerAction
{
    RegisterViewController *regVC = [[RegisterViewController alloc] init];
    [self.navigationController pushViewController:regVC animated:YES];
    
    
}








- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
